<%--
&lt;%&ndash;
  Created by IntelliJ IDEA.
  User: 22181
  Date: 2025/6/9
  Time: 15:02
  To change this template use File | Settings | File Templates.
&ndash;%&gt;
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>注册页面</title>
</head>
<body>
<h1>注册</h1>
<form action="${pageContext.request.contextPath}/register" method="post">
  <label for="account">用户名:</label>
  <input type="text" id="account" name="account" required><br>
  <label for="pwd">密码:</label>
  <input type="password" id="pwd" name="pwd" required><br>
  <input type="submit" value="注册">
</form>
<p style="color: red;">${msg}</p>
</body>
</html>--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>注册页面</title>
  <script src="https://cdn.tailwindcss.com"></script>
 <%-- <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
--%>
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#3f6edc',
          },
        }
      }
    }
  </script>
</head>
<body class="bg-gray-50 min-h-screen flex flex-col items-center justify-center p-4 font-sans">
<div class="w-full max-w-md bg-white rounded-xl shadow-md p-8">
  <h1 class="text-2xl font-bold text-center mb-6 text-gray-800">用户注册</h1>

  <form action="${pageContext.request.contextPath}/register" method="post" class="space-y-4">
    <div>
      <label for="account" class="block text-sm font-medium text-gray-700 mb-1">用户名</label>
      <input type="text" id="account" name="account" required
             class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-primary transition-all">
    </div>

    <div>
      <label for="pwd" class="block text-sm font-medium text-gray-700 mb-1">密码</label>
      <input type="password" id="pwd" name="pwd" required
             class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-primary transition-all">
    </div>

    <button type="submit"
            class="w-full bg-primary text-white py-2 px-4 rounded-lg hover:bg-primary/90 transition-colors">
      注册
    </button>
  </form>

  <p class="text-center mt-4 text-sm text-gray-600">
    已有账户? <a href="login" class="text-primary hover:underline">立即登录</a>
  </p>
</div>
</body>
</html>
